package xkp.lesson.entity;

import java.io.Serializable;
import java.math.BigDecimal;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * USER_INFO
 * @author 
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class UserInfo implements Serializable {
    /**
     * 用户id
     */
    private BigDecimal USER_ID;

    /**
     * 用户名
     */
    private String USER_NAME;

    /**
     * 密码
     */
    private String USER_PWD;

    /**
     * 真实姓名
     */
    private String REAL_NAME;

    /**
     * 电话号码
     */
    private String TELPHONE;

    /**
     * 地址
     */
    private String ADDRESS_STR;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UserInfo other = (UserInfo) that;
        return (this.getUSER_ID() == null ? other.getUSER_ID() == null : this.getUSER_ID().equals(other.getUSER_ID()))
            && (this.getUSER_NAME() == null ? other.getUSER_NAME() == null : this.getUSER_NAME().equals(other.getUSER_NAME()))
            && (this.getUSER_PWD() == null ? other.getUSER_PWD() == null : this.getUSER_PWD().equals(other.getUSER_PWD()))
            && (this.getREAL_NAME() == null ? other.getREAL_NAME() == null : this.getREAL_NAME().equals(other.getREAL_NAME()))
            && (this.getTELPHONE() == null ? other.getTELPHONE() == null : this.getTELPHONE().equals(other.getTELPHONE()))
            && (this.getADDRESS_STR() == null ? other.getADDRESS_STR() == null : this.getADDRESS_STR().equals(other.getADDRESS_STR()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getUSER_ID() == null) ? 0 : getUSER_ID().hashCode());
        result = prime * result + ((getUSER_NAME() == null) ? 0 : getUSER_NAME().hashCode());
        result = prime * result + ((getUSER_PWD() == null) ? 0 : getUSER_PWD().hashCode());
        result = prime * result + ((getREAL_NAME() == null) ? 0 : getREAL_NAME().hashCode());
        result = prime * result + ((getTELPHONE() == null) ? 0 : getTELPHONE().hashCode());
        result = prime * result + ((getADDRESS_STR() == null) ? 0 : getADDRESS_STR().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", USER_ID=").append(USER_ID);
        sb.append(", USER_NAME=").append(USER_NAME);
        sb.append(", USER_PWD=").append(USER_PWD);
        sb.append(", REAL_NAME=").append(REAL_NAME);
        sb.append(", TELPHONE=").append(TELPHONE);
        sb.append(", ADDRESS_STR=").append(ADDRESS_STR);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}